<?php 
include 'konek.php';
if(isset($_GET['kelas']))
{
	$id=$_GET['id'];
	$query=mysql_query("SELECT * FROM kelas WHERE id=$id");
	while ( $assoc=mysql_fetch_assoc($query)) {
	echo '						<div class="form-group">
                                  <label class="col-sm-3 control-label">Nama Kelas Baru</label>
                                  <div class="col-sm-6">
                                    <input class="form-control" type="text" name="kelas" id="pass1" value="'.$assoc['kelas'].'"  required />
                                    
                                  </div>
                                  <div id="passcount" class="col-sm-3"></div>
                                </div>
                                <input name="id" value="'.$assoc['id'].'" style="visibility:hidden;" >';
                               
		
	}

                                
}

if(isset($_GET['mapel']))
{
  $id=$_GET['id'];
  $query2=mysql_query("SELECT * FROM mapel WHERE id=$id");
  while ( $assoc2=mysql_fetch_assoc($query2)) {
  echo '            <div class="form-group">
                                  <label class="col-sm-3 control-label">Nama mapel Baru</label>
                                  <div class="col-sm-6">
                                    <input class="form-control" type="text" name="mapel" id="pass1" value="'.$assoc2['mata_pelajaran'].'"  required />
                                    
                                  </div>
                                  <div id="passcount" class="col-sm-3"></div>
                                </div>
                                <input name="id" value="'.$assoc2['id'].'" style="visibility:hidden;" >';
                               
    
  }

}                                




?>